

<div class="main-content grid_7 alpha">
                        <header>
                            <ul class="action-buttons clearfix fr">
                                <li><a href="../jobs/jview" class="button button-gray no-text" title="View the Task Calendar">Task Calendar<span class="calendar"></span></a></li>
                                <li><a href="documentation/index.html" class="button button-gray no-text help" rel="#overlay">Help<span class="help"></span></a></li>
                            </ul>
                            <div class="view-switcher">
                                <h2>All Upcoming Tasks <a href="#">&darr;</a></h2>
                                <?php echo $this->element('taskmenu');?>
                            </div>
                        </header>

                        <section>
                            <ul class="listing list-view">
                                <?php
                                //echo print_r($_SESSION);
                               // echo pr($tlist);
                                $today = date("Y-m-d H:i:s");
                                $day = date("Y-m-d");
                                //print_r($today);
                                
                                foreach($tlist as $task)
                                {
                                $tdate = date("Y-m-d", strtotime($task['Job']['sdate']));
                                if (($tdate == $day) && ($task['Job']['sdate'] > $today) ) {
                                echo
                                '<li class="tick" id="' . $task['Job']['id'] . '">
                                    <a class="more" href="../jobs/jdetail/' . $task['Job']['id'] . '">&raquo;</a>
                                    <span class="timestamp">' . $task['Job']['sdate'] . '</span>
                                    <a href="../jobs/jdetail/' . $task['Job']['id'] . '">Today</a>
                                    <p>' . $task['Job']['title'] . '</p>
                                </li>';
                                    }
                                elseif($task['Job']['sdate'] > $today) {
                                    echo
                                '<li class="tick" id="' . $task['Job']['id'] . '">
                                    <a class="calendar" href="../jobs/jdetail/' . $task['Job']['id'] . '">&raquo;</a>
                                    <span class="timestamp">' . $task['Job']['sdate'] . '</span>
                                    <a href="../jobs/jdetail/' . $task['Job']['id'] . '">Coming Up</a>
                                    <p>' . $task['Job']['title'] . '</p>
                                </li>';
                                    }
                                }
                                ?>

                            </ul>

                        </section>
                    </div>

                   
       

        



            